package org.cerberus.platform.test;

import org.cerberus.platform.api.IEventMonitor;
import org.cerberus.platform.api.PAttribute;
import org.cerberus.platform.api.PComponent;
import org.cerberus.platform.api.PEvent;

@PComponent(classID="test.AbstractJavaPOSDevice")
public class AbstractJavaPOSDevice {

	@PAttribute
	private boolean open;
	@PAttribute
	private boolean claimed;
	@PAttribute
	private boolean enabled;
	
	@PEvent
	public void open(String logicalName) {
		invokeClientEvent("open", logicalName);
	}
	
	@PEvent
	public void close() {
		invokeClientEvent("close");
	}
	
	@PEvent
	public void longRunningEvent(IEventMonitor monitor) {
		
	}
	
	private static Object invokeClientEventAndWait(String eventName, Object ...parameters) {
		return null;
	}
	
	private static void invokeClientEvent(String eventName, Object ...parameters) {
	}
	
	public boolean isOpen() {
		return open;
	}
	
	public void setOpen(boolean open) {
		this.open = open;
	}
	
	public boolean isClaimed() {
		return claimed;
	}
	
	public void setClaimed(boolean claimed) {
		this.claimed = claimed;
	}
	
	public boolean isEnabled() {
		return enabled;
	}
	
	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	
	
}
